<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>确认订单</title>
    <link rel="stylesheet" href="./css/toBuy.css">
    <link rel="stylesheet" href="./css/address.css">
    <script src="js/jquery-3.7.1.min.js"></script>
</head>
<h2>确认订单</h2>
<body>
<div id="address-bar" class="card" onclick="showManageAddress()">点击选择地址</div>

<div id="manage-address-popup" class="popup">
    <h2>管理地址</h2>
    <div id="address"></div>
    <button class="btn" onclick="showAddAddress()">添加地址</button>
    <button class="btn" onclick="closePopup('manage-address-popup')">关闭</button>
</div>

<div id="add-address-popup" class="popup card">
    <h2>添加地址</h2>
    <div class="input-group">
        <label for="full-name"></label><input type="text" id="full-name" placeholder="输入完整姓名">
        <label for="gender-select"></label><select id="gender-select">
            <option value="" disabled selected>选择称谓</option>
            <option value="先生">先生</option>
            <option value="女士">女士</option>
        </select>
    </div>
    <label for="phone-number"></label><input type="text" id="phone-number" style="width:93.4%" placeholder="输入电话号码">
    <div class="input-group">
        <label for="province-select"></label><select id="province-select" onchange="updateCityOptions()">
            <option value="" disabled selected>选择省份</option>
            <option value="福建">福建</option>
            <option value="广东">广东</option>
            <!-- 更多省份选项 -->
        </select>
        <label for="city-select"></label><select id="city-select" onchange="updateDistrictOptions()">
            <option value="" disabled selected>选择城市</option>
            <!-- 城市选项将根据省份动态更新 -->
        </select>
        <label for="district-select"></label><select id="district-select">
            <option value="" disabled selected>选择区县</option>
            <!-- 区县选项将根据城市动态更新 -->
        </select>
    </div>
    <label for="full-address"></label><input type="text" id="full-address" style="width:93.4%" placeholder="输入完整地址">
    <button class="btn" onclick="addAddress()">添加</button>
    <button class="btn" onclick="closePopup('add-address-popup')">关闭</button>
</div>
<div class="order-summary card">
<div class="product-overview">
    <div class="product-info">
        <h3 class="product-title" id="pt">商品标题</h3>
        <p class="original-price" id="op"><s>原价：¥199.99</s></p>
        <p class="current-price" id="cp">现价：<span>¥149.99</span></p>
    </div>
    <img src="./images/goods/img_1.png" alt="商品图片" id="pi" class="product-image">
</div>
</div>
<div class="order-actions">
    <button class="btn1" onclick="yes()">确认订单</button>
    <button class="btn1" onclick="no()">取消</button>
</div>
<script src="./js/toBuy.js"></script>
<script src="./js/address.js"></script>
</body>
</html>